<html>
	<head>
		<title>Report Penerimaan Kasir</title>
		<style>
			#list_penerimaan_kasir{
				font-size: 10px;
			}
			thead{
				background-color: black;
				color: white;
			}
			
		</style>
	</head>
	<body>
		<center><h1>Laporan Penerimaan Kasir</h1>
		<br/>
		<img src="./media/images/logo2.png"/>
		<br/>
		Periode : <?php echo $tgl_awal?> s/d <?php echo $tgl_akhir?>
		</center>
		<br/><br/>
		<table id="list_penerimaan_kasir" width="800" align="center" border="0">
			<thead>
				<tr>
					<th>No</th>
					<th>Nama Kasir</th>
					<th>Cabang</th>
					<th>Telp.</th>
					<th>Total Tiket</th>
					<th>Total Tiket Void</th>
					<th>Total Omset</th>
					<th>Total Discount</th>
					<th>Total Fee Agen</th>
					<th>Total Void</th>
					<th>Total Biaya Langsung</th>
					<th>Total Setor</th>
				</tr>
			</thead>
			<tbody>
				<?php 
						$sum['total_void'] = '';
						$sum['total_omset'] = '';
						$sum['total_discount'] = '';
						$sum['fee_agen'] = '';
						$sum['total_biaya_langsung'] = '';
						$sum['total_setoran'] = '';?>
				<?php for($i=0;$i<count($list_result);$i++){ ?>
				<?php if(($i+1)%2==1){?>
				<tr style="background-color: lightgray">
				<?php }else{?>
				<tr style="background-color: lightgreen">	
				<?php } ?>
					<td align="center"><?php echo $i+1?></td>
					<td align="center"><?php echo $list_result[$i]['nama']?></td>
					<td align="center"><?php echo $cabang['Nama']?></td>
					<td align="center"><?php echo $cabang['Telp']?></td>
					<td align="center"><?php echo $detail[$i]['total_penumpang']?></td>
					<td align="center"><?php echo $detail[$i]['tiket_void']?></td>
					<td align="center"><?php $sum['total_omset'] += $detail[$i]['total_omset']; echo 'Rp. '.number_format($detail[$i]['total_omset'],0,',','.')?></td>
					<td align="center"><?php $sum['total_discount'] += $detail[$i]['total_discount']; echo 'Rp. '.number_format($detail[$i]['total_discount'],0,',','.')?></td>
					<td align="center"><?php $sum['fee_agen'] += $detail[$i]['fee_agen']; echo 'Rp. '.number_format($detail[$i]['fee_agen'],0,',','.')?></td>
					<td align="center"><?php $sum['total_void'] += $detail[$i]['total_void']; echo 'Rp. '.number_format($detail[$i]['total_void'],0,',','.')?></td>
					<td align="center"><?php $sum['total_biaya_langsung'] += $detail[$i]['jumlah']; echo 'Rp. '.number_format($detail[$i]['jumlah'],0,',','.')?></td>
					<td align="center"><?php $sum['total_setoran'] += $detail[$i]['total_setoran']; echo 'Rp. '.number_format($detail[$i]['total_setoran'],0,',','.')?></td>
				</tr>
				<?php } ?>
				<tr>
					<td align="right" colspan="6"><strong>Total</strong></td>
					<td align="center"><?php echo 'Rp. '.number_format($sum['total_omset'],0,',','.')?></td>
					<td align="center"><?php echo 'Rp. '.number_format($sum['total_discount'],0,',','.')?></td>
					<td align="center"><?php echo 'Rp. '.number_format($sum['fee_agen'],0,',','.')?></td>
					<td align="center"><?php echo 'Rp. '.number_format($sum['total_void'],0,',','.')?></td>
					<td align="center"><?php echo 'Rp. '.number_format($sum['total_biaya_langsung'],0,',','.')?></td>
					<td align="center"><?php echo 'Rp. '.number_format($sum['total_setoran'],0,',','.')?></td>
				</tr>
			</tbody>
		</table>
	</body>
</html>